import request from './request'
// 新歌速递
export function getNewSongsAPI(params){
    return request({
        url:'/top/song',
        method:'get',
        params
    })
}
// 获取音乐 url
export function playMusicAPI(params){
    return request({
        url:'/song/url',
        method:'get',
        params
    })
}
//  可获取 banner( 轮播图 ) 数据
export function bannerAPI(){
    return request({
        url:'/banner',
        method:'get',
    })
}
// 推荐歌单
export function recommendSonglistAPI(params){
    return request({
        url:'/personalized',
        method:'get',
        params
    })
}
// 推荐新音乐
export function recommendSongAPI(){
    return request({
        url:'/personalized/newsong',
        method:'get',
    })
}
// 推荐 mv
export function recommendMVAPI(){
    return request({
        url:'/personalized/mv',
        method:'get',
    })
}
// 获取歌单
export function highQualityAPI(params){
    return request({
        url:'/top/playlist/highquality',
        method:'get',
        params
    })
}

export function songListAPI(params){
    return request({
        url:'/top/playlist',
        method:'get',
        params
    })
}
// 默认全部 mv
export function mvListAPI(params){
    return request({
        url:"/mv/all",
        method:'get',
        params
    })
}
// 获取歌单详情
export function playlistDetailAPI(params){
    return request({
        url:"/playlist/detail",
        method:'get',
        params
    })    
}
// 获取歌曲详情
export function songInfoAPI(params){
    return request({
        url:"/song/detail",
        method:'get',
        params
    })      
}
// 获取评论   type是传过来的路径
export function commentsAPI(params,type){
    return request({
        url:"/comment/"+type,
        method:'get',
        params
    })      
}
// 搜索
export function searchAPI(params){
    return request({
        url:"/cloudsearch",
        method:'get',
        params
    })      
}
// mv 地址
export function playMVAPI(params){
    return request({
        url:"/mv/url",
        method:'get',
        params
    })       
}
// 相似 mv
export function simiMVAPI(params){
    return request({
        url:"/simi/mv",
        method:'get',
        params
    })       
}
// 获取 mv 数据
export function mvDetailAPI(params){
    return request({
        url:"/mv/detail",
        method:'get',
        params
    })       
}
// 获取相似歌手
export function artistsAPI(params,type=""){
    let url = type=="" ? '/artists' : '/artist/'+type
    if(type == 'simi')
        url = '/simi/artist'
    return request({
        url,
        method:'get',
        params
    })     
}
// 获取专辑内容
export function albumAPI(params){
    return request({
        url:"/album",
        method:'get',
        params
    })       
}
// 获取歌词
export function lyricAPI(params){
    return request({
        url:"/lyric",
        method:'get',
        params
    })       
}
// 热搜列表(详细)
export function hotSearchAPI(){
    return request({
        url:"/search/hot/detail",
        method:'get',
    })       
}